aboutsummaryrefslogtreecommitdiff
path: root/src/pages/portfolio/[id].astro
blob: 601ff84fe391e9bf3e2a21308335bf89eeab503f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
---
import type { GetStaticPaths } from "astro";
import { getCollection } from "astro:content";
import PortfolioItemLayout from "@/layouts/PortfolioItemLayout.astro";

export const getStaticPaths: GetStaticPaths = async () => {
  const entries = await getCollection("portfolio");
  return entries.map((entry: any) => ({
    params: { id: entry.id },
    props: { entry },
  }));
};

const { entry } = Astro.props;
---

<PortfolioItemLayout entry={entry} />